from unit01.Page.Page import Page
import time
import unittest
from selenium import webdriver
from ddt import ddt,file_data
@ddt()
class TestCase(unittest.TestCase):
    def setUp(self):
        self.driver=webdriver.Firefox()
        self.driver.maximize_window()

    def tearDown(self):
        time.sleep(4)
        self.driver.quit()

    @file_data(r'C:\Users\Kaka\PycharmProjects\PythonProject37GJZ\unit01\Tool\aaa.json')
    def test_denglu_01(self,info):
        po=Page(self.driver)
        po.a3mall_denglu_01(info)

if __name__ == '__main__':
    unittest.main()


# conftest.py
# import pytest
# from unit01.Page.Page import Page
# from selenium import webdriver
#
#
# @pytest.fixture(scope='function')
# def driver22():
#     driver=webdriver.Firefox()
#     driver.maximize_window()
#     # driver.implicitly_wait(10)
#     yield driver
#     driver.quit()
#
# def test_mall_01(driver22):
#     driver=driver22
#     po=Page(driver)
#     po.a3mall_denglu_01()
#
#
# if __name__ == '__main__':
#     pytest.main()